<?php

/**
 * wap 2.0 购物袋查看
 */
$cache_id = sprintf( '%X', crc32 ( __FILE__ ) );
if (! $smarty->is_cached( 'cart.dwt', $cache_id )) {

	$username = get_username();

	/* 取得购物车商品信息 */
	//$cart_info = $mInterface->getShopCartNew($user_token);
	//var_dump($cart_info['orders_detail']);exit;


	$back_brand = array();
	$now = local_time();

	if (empty($cart_info) || !is_array($cart_info)){
		$cart_info = array();
	}



	/* 计算 配送费(订单金额未满免邮金额，则从接口获取运费)
	 * 商品秒杀免邮活动*/
	//$shipping = shipping_fee();



	$show = wap_getcookie("WAP[show]") ? wap_getcookie("WAP[show]") : 2;

	// 返回链接
	$last_addtocart_brand = wap_getcookie ( "WAP[brd_lst_addtocart]" );
	if ($last_addtocart_brand) {
		$smarty->assign ( 'cart_referer', 'index.php?m=brand&act=index&brand_id=' . $last_addtocart_brand . '&cat_id=0&page=1&perpage=10&sort=0&filter_stock=0&show=0' );
	}


	$smarty->assign('total', 				$total);
	$smarty->assign('cart_info', 			$cart_info);

	$smarty->assign('show', 				$show);

	$smarty->assign('title', 				'购物袋');

}

$smarty->display('cart.dwt');
